import * as request from '@/utils/request';
import Request from '@/common/utils/request';

export function getList(data) {
  return request.get('/system/user/list', data);
}

export function changeStatus(data) {
  return request.put('/system/user/changeStatus', data);
}

export function add(data = {}) {
  return request.post('/system/user', data);
}

export function edit(data = {}) {
  return request.put('/system/user', data);
}

export function del(userId) {
  return request.del(`system/user/${userId}`, {});
}
/**
 * 获取用户缓存
 */
const getCachedList = () => Request.get('/system/user/cache');
/**
 * 获取分组人员信息
 */
const getTeamUserList = () => Request.get('/system/team/getSysTeamUser');

export default {
  getCachedList,
  getTeamUserList,
};
